<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background-color: rgb(210, 210, 220);
        }

        .shell {
            position: relative;
            min-width: 1000px;
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            /* 设置3d变化 */
            transform-style: preserve-3d;
            /* 添加透视效果 */
            perspective: 900px;
        }

        .shell .box {
            position: relative;
            width: 250px;
            height: 350px;
            transition: 0.3s;
            overflow: hidden;
            margin: 30px;
            transform: rotateY(0deg);
            transition-delay: .1s;
            border-radius: 5px;
            border: #fff 5px solid;
        }

        /* 当鼠标所有卡片的父元素点shell上时，
        所有卡片像Y轴翻转20度 */
        .shell:hover .box {
            transform: rotateY(20deg);
        }

        /* 当鼠标悬浮在当前卡片上时，当前卡片的翻转角度为0，
        并放大一点二五倍，加个阴影 */
        .shell .box:hover {
            transform: rotateY(0deg) scale(1.25);
            box-shadow: 0 25px 40px rgba(0, 0, 0, 0.7);
            z-index: 1;
        }

        /* 当鼠标悬浮在卡片上时，
        当前卡片后面的所有卡片全部都反向翻转负20度 */
        .shell .box:hover~.box {
            transform: rotateY(-20deg);
        }

        .shell .box .images img {
            width: 100%;
        }

        .shell .box .content {
            position: absolute;
            top: 0;
            width: 90%;
            height: 100%;
            z-index: 999;
            padding: 15px;
        }

        .shell .box .content h2 {
            color: rgb(210, 140, 140);
            transition: 0.3s;
            font-size: 20px;
            transform: translateY(-100px);
        }

        .shell .box:hover .content h2 {
            transform: translateY(-15px);
        }

        .shell .box .content p {
            color: rgb(0, 0, 0);
            transition: 0.3s;
            font-size: 14px;
            transform: translateY(600px);
            background-color: rgba(255, 255, 255, 0.7);
        }

        .shell .box:hover .content p {
            transform: translateY(220px);
        }
    </style>
</head>

<body>
    <div class="shell">
        <div class="box">
            <div class="images">
                <img src="https://picsum.photos/200/300?1">
            </div>
            <div class="content">
                <h2>ZeenChin</h2>
                <p>The style in the painting integrates temptation, fantasy and strangeness
                </p>
            </div>
        </div>
        <div class="box">
            <div class="images">
                <img src="https://picsum.photos/200/300?1">
            </div>
            <div class="content">
                <h2>ZeenChin</h2>
                <p>The style in the painting integrates temptation, fantasy and strangeness
                </p>
            </div>
        </div>
        <div class="box">
            <div class="images">
                <img src="https://picsum.photos/200/300?1">
            </div>
            <div class="content">
                <h2>ZeenChin</h2>
                <p>The style in the painting integrates temptation, fantasy and strangeness
                </p>
            </div>
        </div>
        <div class="box">
            <div class="images">
                <img src="https://picsum.photos/200/300?1">
            </div>
            <div class="content">
                <h2>ZeenChin</h2>
                <p>The style in the painting integrates temptation, fantasy and strangeness
                </p>
            </div>
        </div>
        <div class="box">
            <div class="images">
                <img src="https://picsum.photos/200/300?1">
            </div>
            <div class="content">
                <h2>ZeenChin</h2>
                <p>The style in the painting integrates temptation, fantasy and strangeness
                </p>
            </div>
        </div>
    </div>
</body>

</html>